

import http from "../commons/utils/axios-util";


export default class PositionApi {
    public static REQUEST_PREFIX = 'position/';

    /**
     * 初始岗位管理数据
     * @param params 
     */
    static initPositionManageData(params: any) {
        return http.post(`${PositionApi.REQUEST_PREFIX}initPositionManageData`, params);
    }



    /**
    * 查询岗位信息
    */
    static queryPositionByPositionId(positionId: string) {
        return http.get(`${PositionApi.REQUEST_PREFIX}queryPositionByPositionId`, {
            params: {
                positionId
            }
        });
    }

    /**
    * 根据条件查询岗位
    * @param params 
    */
    static queryPositionByCondition(params: any) {
        return http.post(`${PositionApi.REQUEST_PREFIX}queryPositionByCondition`, params);
    }

    /**
    * 初始化岗位添加数据
    * @param params 
    */
    static initPositionAddData(params: any) {
        return http.post(`${PositionApi.REQUEST_PREFIX}initPositionAddData`, params);
    }

    /**
    * 保存岗位
    * @param params 
    */
    static savePosition(params: any) {
        return http.post(`${PositionApi.REQUEST_PREFIX}savePosition`, params);
    }

    /**
     * 根据ids删除岗位
     * @param params 
     */
    static deletePositionByIds(params: any) {
        return http.post(`${PositionApi.REQUEST_PREFIX}deletePositionByIds`, params);
    }



    /**
    * 查询岗位用户
    */
    static queryPositionUsers(positionId: string) {
        return http.get(`${PositionApi.REQUEST_PREFIX}queryPositionUsers`, {
            params: {
                positionId
            }
        });
    }

}
